Device with communication interface and method for controlling database access

ABSTRACT

The invention relates to a device that is set up for device-internal handling of data in a text format, that has a communication interface set up to interchange binary data, particularly EXI data, and that provides a coder for reciprocally converting the binary data into text format data, wherein the coder is set up to associate resource descriptions with a respective identification number. This association is managed via a resource table, which is managed by the coder and in which a respective resource description in text form has an associated respective identification number. In addition, the device has, in a manner that is standard in the art, at least one device-internal database for storing resources and the relationships between said resources. According to the invention, a database access control unit is provided that has access both to the database and to the resource table. Centralisation of the resource table advantageously avoids redundant storage of resource descriptions. A further measure according to the invention provides for the database access control unit to be designed such that a resource to be stored is referenced on the basis of the associated identification number rather than the resource description. In comparison with the measures known in the prior art, the invention leads to faster reaction times for production of the EXI data stream.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is the National Stage of International Application No. PCT/EP2015/068512, filed Aug. 12, 2015, which claims the benefit of German Patent Application No. DE 102014219090.8, filed Sep. 22, 2014. The entire contents of these documents are hereby incorporated herein by reference.

TECHNICAL FIELD

The present embodiments relate to a device having a communication interface and to a method for controlling database access.

BACKGROUND

Description languages for specifying data formats and methods for processing data are known in the prior art. One known description language is “Extensible Markup Language” (XML). XML is used to describe hierarchically structured data in text form or plain text. XML is used for platform-independent interchange of data between computer systems. The textual nature of XML is readable both by machines and by human beings.

Frequently, fast data interchange between computer systems is to be provided and may not be achieved with a textual description language such as XML. Therefore, binary representations of XML have been proposed. A binary representation of XML (e.g., “Efficient XML Interchange” (EXI)) is faster to process in comparison with text-based XML data and uses less transmission bandwidth for the data interchange between computer systems. Use of EXI is incidentally not limited solely to a binary representation of XML. EXI may be used as an interchange format for transmitting any semistructured data.

The interchange format EXI exhibits particular advantages for use in XML-based applications when a microcontroller having limited memory space and computation power is used. Devices that operate using microcontrollers (e.g., intelligent sensors in a production line or in a vehicle) may be configured for device-internal processing of data in a text-based XML format, but may interchange data with one another via appropriate communication interfaces based on binary data (e.g., binary data according to EXI specifications).

Besides using a more compressed binary data transmission, the XML format also affords the advantage of referencing text-based resource descriptors with a compact identification number following a first transmission as a character string, and for a subsequent transmission, using the identification number instead of the text-based resource descriptors for denoting resources. This involves provision for maintenance of resource tables or “EXI string tables” on both sides of the transmission, allowing for an even more compact transmission of the EXI stream or EXI datastream between the two communication interfaces of the transmission partners.

The data to be transmitted using EXI may be extracted from a database of a communication partner based on a request. Subsequently, the EXI datastream is produced dynamically in a memory area. In the course of this production, updates are applied to the stored data on a case by case basis (e.g., by adding or erasing data). The data updated in this manner may then be converted into an EXI datastream by an encoder or EXI processor, where the EXI datastream is transmitted to the communication partner via a communication interface.

Only in the course of production of the EXI datastream is the transmitter-end resource table (e.g., “EXI string table”) configured by the encoder. This ad hoc production of the EXI datastream and the resource table in the course of an enquiry disadvantageously uses increased memory space and computation power.

Producing the EXI datastream also has the disadvantage that both the resource table and the database store a plurality of resource descriptors in text form. The redundant memory space occupancy is disadvantageous when, for example, a microcontroller with limited memory space and computation power is used. Use of the EXI interchange format may attain a saving on required memory space.

SUMMARY AND DESCRIPTION

The scope of the present invention is defined solely by the appended claims and is not affected to any degree by the statements within this summary.

One or more of the present embodiments may obviate one or more of the drawbacks or limitations in the related art. For example, reduction in the memory space and computation power currently used for producing and interchanging binary data in a device configured for device-internal processing of data in a text format and having a communication interface configured for interchanging binary data is provided.

A device that is configured for device-internal processing of data in a text format and has a communication interface that is configured for interchanging binary data is provided. An encoder is provided for reciprocally converting binary data into text format data. The encoder is configured for associating resource descriptors with a respective identification number. This association is managed using a resource table managed by the encoder. A respective identification number is associated with a respective resource descriptor in text form. In addition, the device has at least one device-internal database for storing resources and the relationships thereof with one another.

According to one or more of the present embodiments, a database access control unit that has access to the database and to the resource table is provided. Centralization of the resource table may prevent redundant storage of resource descriptors.

One or more of the present embodiments provides for the database access control unit to be configured such that a resource to be stored is referenced based on the associated identification number instead of the resource descriptor.

Further, centralization of the resource table provides that the database only needs to store a respective identification number for referencing the resource. An identification number is stored in the integer data format (e.g., using far less memory in comparison with a resource descriptor that is to be stored as a character string). The disadvantageous redundant storage of the resource descriptor in the database and in the resource table is eliminated.

Computation complexity for comparing the resource descriptor in a parsing method or string comparison method is diminished. Creation of the binary data and substantial reduction of a response time for an enquiry is provided.

The computation complexity that the previously redundant data management required for performing the string comparison methods is diminished, and thus, the computation complexity previously necessary both upstream of the database access control unit for searching the database and at the encoder for searching the resource table is diminished.

One or more of the present embodiments are based on matching the data managed in the database to the EXI conventions as much as possible. Accordingly, data is stored in an EXI-related form in order to be able to use the advantages of EXI and to be able to react well to update and erasure operations.

A method is provided for controlling database access in a device configured for device-internal processing of data in a text format and having a communication interface that is configured for interchanging binary data. Interchanging binary data may be provided according to EXI specifications. The method includes accepting a request for storing a resource in a device-internal database. The request characterizes the resource based on a resource descriptor in a text format. The method also includes extracting an identification number associated with the resource to be stored from a resource table associated at least to some extent with an encoder. The method further includes storing the resource based on the associated identification number instead of the resource descriptor.

A computer program product having a computer program is executed in a processor to carry out the method discussed above. The computer program product includes a non-transitory computer-readable storage medium executable by the processor to carry out the method discussed above.

According to one or more embodiments, the method includes prompting, by a write access request, to extract a resource descriptor associated with the write access request, identifying an identification number associated with the resource descriptor in the resource table, and storing the associated identification number in a field provided in the database for the resource to be stored. A reduction in the number of parsing or string comparison operations to one operation may be provided. The remainder of the progression using the identification number as a reference to the resource.

According to one or more embodiments, a new entry is created in the resource table for a resource descriptor that is unidentifiable in the resource table. A new entry enters the unidentifiable resource descriptor as a new resource descriptor and associates the new resource descriptor with a new identification number. This configuration provides an additional load reduction for the encoder. Even before an enquiry after a resource, the encoder is relieved of the load of creating a new entry in the resource table at the time of generation of the EXI datastream.

According to one or more embodiments, the method includes prompting, by a read access operation, to extract the identification number associated with the resource to be read from the database and transferring the identification number to the encoder. This provides that a read access operation in the course of an enquiry may use the identification number that is advantageous for the encoder. The encoder is therefore relieved of the previously required task of extracting the identification number from the resource table at the time of generation of the EXI datastream using a computation-intensive parsing or string comparison operation.

According to one or more embodiments, there is provision for the resources and the relationships thereof to include at least one subject, at least one predicate and at least one object. This measure provides data management according to a “resource description framework” with further use of a database configured as a triple store.

According to one or more embodiments, there is provision for storing resources (e.g., particularly objects) containing a data value instead of a resource descriptor (e.g., as a data value with a description of the data type in the database). If the values of resources are not text data (e.g., an integer, floating point number or float, Boolean, etc.) type, then the resources are encoded by a standardized EXI type encoding format in “type-aware” fashion. More rapid and more memory-efficient processing of the resources may be provided in an EXI datastream by the encoder.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a schematic depiction of functional units of one embodiment of a device that are involved in data storage and data interchange via a communication interface.

DETAILED DESCRIPTION

FIG. 1 nonexhaustively shows functional units of a device. The device includes a first and a second device-internal database TS1, TS2, a database access control unit CTR, a resource table RSC, an encoder ECD, and a communication interface IF.

In addition, a resource table RSC is provided that may be read or written to via the database access control unit CTR and via the encoder ECD. In alternative embodiments, there may also be multiple resource tables provided (e.g., managed both by one of the database access control units CTR and by the encoder ECD). Access to the resource table(s) by the database access control units CTR and by the encoder ECD is a core advantage of one or more of the present embodiments. The prior art only has provision for managing a resource table RSC by the encoder ECD.

As depicted in FIG. 1, two databases TS1, TS2 are read and written to via a common database access control unit CTR. In alternative embodiments, any number of databases may be managed. Alternatively, the databases may be managed by a database access control unit associated with each respective database alone.

The data to be transmitted via the communication interface IF is extracted from a database TS1, TS2 by the database access control unit CTR based on a device-external or device-internal request. The data is transferred to the encoder ECD, which produces a binary datastream or EXI datastream and outputs the datastream to the communication interface IF.

According to one or more of the present embodiments, the database access control unit CTR that is more centralized is provided with access to both the databases TS1, TS2 and the resource table RSC. Centralization of the resource table RSC advantageously prevents redundant storage of resource descriptors.

The database access control unit CTR is configured such that a resource to be stored is referenced based on an associated identification number instead of the resource descriptor. In conjunction with the centralization of the resource table RSC, referencing based on an associated identification number provides that the databases only have to store a respective identification number for referencing the resource. An identification number is stored in the integer data format (e.g., requiring far less memory in comparison with a resource descriptor that is to be held as a character string). Redundant storage of the resource descriptor both in the databases TS1, TS2 and in the resource table RSC is therefore eliminated.

An exemplary resource table RSC is depicted below. The resource table RSC references a respective resource descriptor in text form. For example, in the table, “CH” represents the “character” and “ID” represents the identification number.

Ch ID a 1 b 2 c 3 d 4 e 5 f 6 g 7

In the exemplary resource table RSC depicted above, the resource descriptors a, b, c, d, e represent arbitrary character strings (e.g., in the form “temperature sensor” or “measures temperature value with a Kelvin Degree of”).

The databases TS1, TS2 store resources and the relationships of the resources with one another. The organization of the stored data is based on a known data model called “resource description framework” or RDF. The data model RDF has formal semantics that are based on directional graphs. Data in RDF includes statements about resources. These statements are modeled as triples. The set of triples forms a graph. A triple is an elementary statement that includes of a subject, a predicate, and an object. For storing RDF triples in databases and data structures, designs are known as a triple store in specialist circles. An organization of triple stores differs from conventional database designs because storage of triples in a conventional database (e.g., relational table) is not efficient enough for many queries. In devices equipped with a microcontroller having limited memory space and computation power to offer, the triple store may also be referred to as μRDF.

Exemplary data records in the database TS1, TS2 configured as a triple store are depicted in the table below. The data records or triples include a subject (column S), a predicate (column P), and an object (column O).

S P O (TA) 1 2  3 (string) 1 2  4 (string) 1 5 22.3 (float) 6 5  2.4 (float) 6 2  7 (string)

The resource descriptor is not stored exclusively in text form, as was customary in the prior art. The resource descriptor is stored in the form of an identification number associated with the resource descriptor, as depicted in the resource table shown above.

Based on the above data records, not all resources have associated identification numbers as a reference to the associated resource description. Resources (e.g., objects) containing a data value instead of a resource descriptor are stored in the above table as a data value with a description of the data type. The data type (e.g., integer, floating point number or float, Boolean, etc.) is indicated together with the object in the embodiment above (e.g., “TA” or “type-aware” in the table).

If a data type is defined as a character string (e.g., “string”), then the resource characterized by the data type corresponds to an identification number associated with the resource descriptor according to the resource table shown above.

In the table above, the following objects are entered in the order of the entries of the O column: 3 (string), a character string extractable from the resource table with the identification number “3”; 4 (string), a character string extractable from the resource table with the identification number “4”; 22.3 (float), a floating point number with the value 22.3;

2.4 (float), a floating point number with the value 2.4: and 7 (string), a character string extractable from the resource table with the identification number “7”.

If the values of resources are not text data (e.g., of integer, floating point number or float, Boolean, etc.) type, then the resources are encoded by a standardized EXI type encoding format in “type-aware” fashion. This allows more rapid and more memory-efficient processing of the resources to be included in an EXI datastream by the encoder.

A subject (e.g., in the exemplary triple, see the third row) has a character string that corresponds to a character string for association according to the resource table having the identification number 1 (e.g., the exemplary resource description a). As a predicate, the data record has a character string that corresponds to a character string for association according to the resource table having the identification number 5 (e.g., the exemplary resource description e). As an object, the data record has a floating point number having the value 22.3. This object is thus ascertained without involving the resource table.

New resources to be included in the database are collated with existing resource descriptions and associated identification numbers in the resource table to prevent multiple entries of resource descriptions. If a new resource description to be included is not yet present in the resource table, then the new resource description is entered in the resource table with a new identification number.

Encoding the binary data performed by the encoder ECD takes a simple form, because all valid identification numbers serving as references to the resource description or resource do not have to be produced by the encoder on an ad hoc basis. Instead, references to the resource description or resource are already present in every single data record. This allows a much faster binary data encoding method.

The provision of a “central” resource table for shared access by the database access control unit CTR and by the encoder ECD does not prohibit multiple resource tables from being provided. For a larger volume of resource descriptors, it may be advantageous for values of attributes or elements to be entered in a first resource table and for the attribute names or element names to be entered in a second resource table. This distributed depositing is not inconsistent with the proposed principle of referencing resources using an explicit identification number.

In summary, the present embodiments relate to a device that is configured for device-internal processing of data in a text format and has a communication interface. The communication interface is configured for interchanging binary data (e.g., EXI data) and provides an encoder for reciprocally converting the binary data into text format data. The encoder is configured for associating resource descriptors with a respective identification number. This association is managed using a resource table (e.g., managed by the encoder) in which a respective identification number is associated with a respective resource descriptor in text form. In addition, the device includes at least one device-internal database for storing resources and the relationships of the resources with one another. According to one or more of the present embodiments, a database access control unit is provided that has access to both the database and to the resource table. Centralization of the resource table advantageously prevents redundant storage of resource descriptors. Further, the database access control unit is provided and configured such that a resource to be stored is referenced based on the associated identification number instead of the resource descriptor.

The present embodiments lead to faster reaction times for creating the EXI datastream when compared to the prior art. Close proximity to the representation of the actual interchange format EXI achieves efficient representation and handling of the data. Centralized management of the resource description leads to advantageous prevention of redundancies and a substantially reduced memory space requirement.

The elements and features recited in the appended claims may be combined in different ways to produce new claims that likewise fall within the scope of the present invention. Thus, whereas the dependent claims appended below depend from only a single independent or dependent claim, it is to be understood that these dependent claims may, alternatively, be made to depend in the alternative from any preceding or following claim, whether independent or dependent. Such new combinations are to be understood as forming a part of the present specification.

While the present invention has been described above by reference to various embodiments, it should be understood that many changes and modifications can be made to the described embodiments. It is therefore intended that the foregoing description be regarded as illustrative rather than limiting, and that it be understood that all equivalents and/or combinations of embodiments are intended to be included in this description. 

1. A device having a communication interface, the device configured for device-internal processing of data in a text format, the communication interface configured for interchanging binary data, the device comprising: an encoder configured for reciprocally converting the binary data into text format data, the encoder configured for associating resource descriptors with a respective identification number; a resource table associated with the encoder, wherein the resource table associates the resource descriptors with the respective identification number; at least one device-internal database configured for storing resources and the relationships of the resources; and at least one database access control unit having access to the at least one device-internal database and to the resource table, the database access control unit configured for storing an identification number associated with a resource to be stored, wherein the database control unit is not configured to store the resource descriptor.
 2. The device of claim 1, wherein the database access control unit is configured to be prompted by a write access request to extract a resource descriptor associated with the write access request, to identify an identification number associated with the resource descriptor in the resource table, and to store the associated identification number in a field provided in the database for the resource to be stored.
 3. The device of claim 2, wherein the database access control unit is configured to create a new entry in the resource table for a resource descriptor that is unidentifiable in the resource table, wherein the new entry enters the unidentifiable resource descriptor as a new resource descriptor and associates the new resource descriptor with a new identification number.
 4. The device of claim 1, wherein the database access control unit is configured to be prompted by a read access operation to extract an identification number associated with a resource to be read from the database and to transfer the identification number to the encoder.
 5. The device of claim 1, wherein the text format is configured in an XML format.
 6. The device of claim 1, wherein the resources and the relationships of the resources comprise at least one subject, at least one predicate and at least one object.
 7. The device of claim 1, wherein the database is a triple store.
 8. The device of claim 1, wherein a database storing resources comprises a data value, wherein the data value is not a resource descriptor, wherein the data value comprises a description of the data type in the database.
 9. The device of claim 8, wherein the description of the data type is provided in an EXI type encoding format.
 10. A method for controlling database access in a device configured for device-internal processing of data in a text format, the device comprising a communication interface configured for interchanging binary data, the method comprising: accepting a request for storing a resource in a device-internal database, wherein the request characterizes the resource based on a resource descriptor in a text format; extracting an identification number associated with the resource to be stored from a resource table associated with an encoder; and storing the resource based on the associated identification number, wherein the resource is not stored based on the resource descriptor.
 11. The method of claim 10, wherein accepting the request prompts the data value to be stored in the database with a description of the data type.
 12. In a non-transitory computer-readable storage medium storing instructions executable by a database access controller to control database access in a device configured for device-internal processing of data in a text format, the device comprising a communication interface configured for interchanging binary data, the instructions comprising: accepting a request for storing a resource in a device-internal database, wherein the request characterizes the resource based on a resource descriptor in a text format; extracting an identification number associated with the resource to be stored from a resource table associated with an encoder; and storing the resource based on the associated identification number, wherein the resource is not stored based on the resource descriptor.
 13. The method of claim 10, wherein the communication interface is configured for interchanging binary data according to EXI specifications.
 14. The method of claim 11, wherein the description of the data type comprises an EXI type encoding format.
 15. The device of claim 1, wherein the stored resources comprise objects.
 16. The device of claim 2, wherein the database access control unit is configured to be prompted by a read access operation to extract an identification number associated with a resource to be read from the database and to transfer the identification number to the encoder.
 17. The device of claim 2, wherein the text format is configured in an XML format.
 18. The device of claim 2, wherein the resources and the relationships of the resources comprise at least one subject, at least one predicate and at least one object.
 19. The device of claim 2, wherein the database is a triple store.
 20. The device of claim 2, wherein a database storing resources comprises a data value, wherein the data value is not a resource descriptor, wherein the data value comprises a description of the data type in the database. 